//
//  LiveVideoViewController.m
//  LOL_PalmarHelper
//
//  Created by dlios on 15-6-26.
//  Copyright (c) 2015年 hantao. All rights reserved.
//

#import "LiveVideoViewController.h"

@interface LiveVideoViewController ()

@end

@implementation LiveVideoViewController


- (void)dealloc
{
    [_mycell release];
    [_tableV release];
    [super dealloc];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.navigationItem.title = @"视频直播间";
    
    
    
    
    
    self.tableV = [[UITableView alloc] initWithFrame:CGRectMake(self.view.bounds.origin.x, self.view.bounds.origin.y, self.view.bounds.size.width, self.view.frame.size.height) style:UITableViewStylePlain];
    self.tableV.backgroundColor = [UIColor groupTableViewBackgroundColor];
    
    self.tableV.delegate = self;
    self.tableV.dataSource = self;
    
    
        self.tableV.separatorStyle = UITableViewCellSeparatorStyleNone;
    
    self.tableV.bounces = NO;
    
    [self.view addSubview:self.tableV];
    
    
    [_tableV release];

    
    
    
    
}



-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    [self.tableV reloadData];
}

// 点击

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
   
    if (indexPath.section == 0 && indexPath.row == 0) {
        
        LiveWebViewController *webVC = [[LiveWebViewController alloc] init];
        
        webVC.myurl = @"http://lol.tga.plu.cn/";
        
        [self.navigationController pushViewController:webVC animated:YES];
        
        [webVC release];
        
        
    }
    
    
    if (indexPath.row == 1 && indexPath.section == 0) {
        
        LiveWebViewController *webVC = [[LiveWebViewController alloc] init];
        
        webVC.myurl = @"http://m.huya.com/g/lol";
        
        [self.navigationController pushViewController:webVC animated:YES];
        
        [webVC release];

        
    }

    if (indexPath.row == 2 && indexPath.section == 0) {
        
        LiveWebViewController *webVC = [[LiveWebViewController alloc] init];
        
        webVC.myurl = @"http://longzhu.com/m/channels/lol";
        
        [self.navigationController pushViewController:webVC animated:YES];
        
        [webVC release];
        
        
    }

    if (indexPath.row == 3 && indexPath.section == 0) {
        
        LiveWebViewController *webVC = [[LiveWebViewController alloc] init];
        
        webVC.myurl = @"http://m.zhanqi.tv/games?gameid=6";
        
        [self.navigationController pushViewController:webVC animated:YES];
        
        [webVC release];
        
        
    }

    
    
    
    
    
    
    
    
    
    
    
}


-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    
    return 1;
}


//-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
//{
//    return self.view.frame.size.height - 250;
//}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    
    
    return 45;
    
    
}






-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    
    
    
    return 4;
    
}





-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    static NSString *indentifier = @"myCell";
    MoreTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:indentifier];
    if (cell == nil) {
        
        cell = [[MoreTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:indentifier];
        
    }
    
     cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    
    if (indexPath.section == 0 && indexPath.row == 0) {
        
        cell.str = @"f10648560d33605f97d55c5338552d89.jpg";
        
        cell.str1 = @"职业比赛直播";
        
        cell.str2 = @"";
        
    }
    
    
    if (indexPath.section == 0 && indexPath.row == 1) {
        
        cell.str = @"c55d5d07712f9bb0d55629f57d3ee51a.jpg";
        
        cell.str1 = @"虎牙直播";
        
        cell.str2 = @"";
        
    }
    
    if (indexPath.section == 0 && indexPath.row == 2) {
        
        cell.str = @"0a6dc6e04019a489ca568f8059ef34c4.jpg";
        
        cell.str1 = @"龙珠直播";
        
        cell.str2 = @"";
        
    }
    
    
    if (indexPath.section == 0 && indexPath.row == 3) {
        
        cell.str = @"3d594f6689ac0db6b6bb515362cae5e0.jpg";
        
        cell.str1 = @"战旗TV直播";
        
        cell.str2 = @"";
        
    }
    
    
    
    
    return cell;
}

















- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
    
    
    
    
    
    
    
    
    
    
    
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
